Field of the Invention
The present invention relates to a document reading apparatus for reading an image of a document, a method for controlling a document reading apparatus, and a storage medium.
Description of the Related Art
There is a document reading apparatus for automatically setting a file name for image data generated by reading an image of a document.
Japanese Patent Application Laid-Open No. 2005-56315 discusses a digital color multifunction peripheral for, when saving in a storage device an image file of image data read from a document by an image reading apparatus, automatically assigning a file name to the image file.
If a mode of performing a process of automatically assigning a file name to an image file (a file name automatic assignment mode) is set, this multifunction peripheral performs a character recognition process on the image of the image file. Then, if the file name automatic assignment mode is set and a character or a character string is recognized in the character recognition process, the multifunction peripheral automatically assigns, as the file name of the image file, the character or the character string recognized in the character recognition process. Further, if the file name automatic assignment mode is set and a character or a character string is not recognized in the character recognition process, the multifunction peripheral automatically assigns, as the file name of the image file, a character string including the date and time when the document was read, and further including a predetermined extension. If, on the other hand, the file name automatic assignment mode is not set, the multifunction peripheral automatically assigns, as the file name of the image file, a character string including the date and time when the document is read, and further including a predetermined extension.
If it is allowed to overwrite image files having the same file name, it is not necessary to set a file name including characters representing unique information such as a date and time or a reception number.
Conventionally, however, a user cannot give an instruction not to include characters representing unique information such as a date and time or a reception number in the file name of an image file.
Further, as another problem, if an instruction not to include characters representing unique information such as a date and time or a reception number in the file name of an image file is given, and if the file name of the image file does not include any character, the file name results in including only the extension. The image file of which the file name includes only the extension is treated as a hidden file by an operating system of a server. Thus, the user cannot easily find out a desired image file based on the file name.